package com.bltec.emergency.service.foreignService.impl;

import com.bltec.emergency.mapper.ForeignVesselNumberMapper;
import com.bltec.emergency.model.ForeignVesselNumber;
import com.bltec.emergency.service.foreignService.ForeignVesselNumberService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class ForeignVesselNumberServiceImpl implements ForeignVesselNumberService {
    @Resource
    private ForeignVesselNumberMapper foreignVesselNumberMapper;
    @Override
    public boolean add(ForeignVesselNumber foreignVesselNumber) {
        return foreignVesselNumberMapper.insert(foreignVesselNumber);
    }

    @Override
    public boolean deleteForeignVesselNumberById(Long id) {
        return foreignVesselNumberMapper.setDisableById(id);
    }

    @Override
    public boolean updateForeignVesselNumberById(ForeignVesselNumber foreignVesselNumber) {
        return foreignVesselNumberMapper.updateForeignVesselNumberById(foreignVesselNumber);
    }

    @Override
    public ForeignVesselNumber getForeignVesselNumberById(Long id) {
        return foreignVesselNumberMapper.getForeignVesselNumberById(id);
    }

    @Override
    public List<ForeignVesselNumber> getAll() {
        return foreignVesselNumberMapper.selectAll();
    }
}
